package datastructures;

import java.util.ArrayList;


public class MyNode {

	double f;
	double g;
	double h;

	int cost;
	int tiefe;
	MyNode parent;
	String name;
	Koordinate koord;

	ArrayList<MyNode> childs = new ArrayList<MyNode>();

	public MyNode(String name, Koordinate k, MyNode parent) {
		this.name = name;
		this.koord = k;
	}

	public MyNode(int value, MyNode parent) {
		this.cost = value;
		this.parent = parent;

	}
	
	public MyNode(String name) {
		this.name = name;
		this.f = 0;
		this.g = 0;
		this.h = 0;
		this.cost = 3;

	}

	public void addChild(MyNode child) {
		this.childs.add(child);

	}

	public void removeChild(MyNode child) {
		this.childs.remove(child);

	}

	public double getF() {
		return f;
	}

	public double getG() {
		return g;
	}

	public double getH() {
		return h;
	}

	public MyNode getParent() {
		return parent;
	}

	public String getName() {
		return name;
	}

	public int getCost() {
		return cost;
	}

	public void setF(double f) {
		this.f = f;
	}

	public void setG(double g) {
		this.g = g;
	}

	public void setH(double h) {
		this.h = h;
	}

	public void setParent(MyNode parent) {
		this.parent = parent;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ArrayList<MyNode> getChilds() {
		return childs;
	}

	public void setChilds(ArrayList<MyNode> childs) {
		this.childs = childs;
	}

	@Override
	public String toString() {
		return getName() + " " + String.valueOf(cost);
	}

	public int getTiefe() {
		return tiefe;
	}

	public void setTiefe(int tiefe) {
		this.tiefe = tiefe;
	}

}
